package com.example.okhttpstudy.netinterface;

import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * 创建network的接口
 */
public interface HttpService {

    @POST("post")
    @FormUrlEncoded
    Call<ResponseBody> post(@Field("username") String username, @Field("password") String password);

    @GET("get")
    Call<ResponseBody> get(@Query("username") String username, @Query("username") String password);
}
